package com.qst.service.impl;

import com.qst.dao.CheckoutMapper;
import com.qst.pojo.Checkout;
import com.qst.service.CheckoutService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service @Transactional public class CheckoutServiceImpl implements CheckoutService {

	 @Autowired private CheckoutMapper checkoutMapper;

	 @Override public void insertcheckout(Checkout checkout) {
		  checkoutMapper.insertcheckout(checkout);

	 }

	 @Override public List<Checkout> getAllCheckout() {
		  List<Checkout> checkout = checkoutMapper.getAllCheckout();
		  return checkout;
	 }

	 @Override public List<Checkout> getCheckout(Integer fangdongid) {
		  List<Checkout> checkout = checkoutMapper.getCheckout(fangdongid);
		  return checkout;
	 }

	 @Override public void deletecheckout(Integer id) {

		  checkoutMapper.deletecheckout(id);
	 }

}
